package com.h3c.nem.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * Copyright (C), 2020-2020, h3c
 * FileName: TbWorker
 *
 * @Author: l22886
 * @Date: 2022-02-10
 * Description: tb_worker 实体
 * Version: 1.0
 */
@ApiModel(value="TbWorker对象", description="")
@Table(name = "tb_worker")
@Data
public class TbWorker {

    @ApiModelProperty(value = "工号")
    @Column(name = "worker_id")
    @TableId
    private String workerId;

    @ApiModelProperty(value = "姓名")
    @Column(name = "worker_name")
    private String workerName;

    @ApiModelProperty(value = "一级部门名称")
    @Column(name = "dept1name")
    private String dept1name;

    @ApiModelProperty(value = "二级部门名称")
    @Column(name = "dept2name")
    private String dept2name;

    @ApiModelProperty(value = "三级部门名称")
    @Column(name = "dept3name")
    private String dept3name;

    @ApiModelProperty(value = "四级部门名称")
    @Column(name = "dept4name")
    private String dept4name;

    @ApiModelProperty(value = "直属部门ID")
    @Column(name = "direct_dept_id")
    private Integer directDeptId;

    @ApiModelProperty(value = "入职日期")
    @Column(name = "join_date")
    private Date joinDate;

    @ApiModelProperty(value = "试用期月数")
    @Column(name = "probation_month")
    private Integer probationMonth;

    @ApiModelProperty(value = "转正日期")
    @Column(name = "pass_date")
    private Date passDate;

    @ApiModelProperty(value = "性别：1 男； 2 女；")
    @Column(name = "sex")
    private Integer sex;

    @ApiModelProperty(value = "岗位名称")
    @Column(name = "post_name")
    private String postName;

    @ApiModelProperty(value = "工作履行地")
    @Column(name = "work_city")
    private String workCity;

    @ApiModelProperty(value = "数据来源")
    @Column(name = "data_src")
    private String dataSrc;

    @ApiModelProperty(value = "人事范围（公司名称）")
    @Column(name = "company_name")
    private String companyName;

    @ApiModelProperty(value = "学历")
    @Column(name = "edu_level")
    private String eduLevel;

    @ApiModelProperty(value = "年龄")
    @Column(name = "age")
    private String age;

    @ApiModelProperty(value = "专业名称")
    @Column(name = "edu_major_name")
    private String eduMajorName;

    @ApiModelProperty(value = "工作经历")
    @Column(name = "work_experience")
    private String workExperience;

    @ApiModelProperty(value = "部门接口人")
    @Column(name = "dept_contactor")
    private String deptContactor;

    @ApiModelProperty(value = "思想导师工号/姓名")
    @Column(name = "teacher_info")
    private String teacherInfo;

    @ApiModelProperty(value = "直接上级工号/姓名")
    @Column(name = "direct_manager")
    private String directManager;

    @ApiModelProperty(value = "隔级上级工号/姓名")
    @Column(name = "second_manager")
    private String secondManager;

    @ApiModelProperty(value = "第一考核人工号/姓名")
    @Column(name = "first_approver")
    private String firstApprover;

    @ApiModelProperty(value = "第二考核人工号/姓名")
    @Column(name = "second_approver")
    private String secondApprover;

    @ApiModelProperty(value = "第三考核人工号/姓名")
    @Column(name = "third_approver")
    private String thirdApprover;

    @ApiModelProperty(value = "最终考核人工号/姓名")
    @Column(name = "final_approver")
    private String finalApprover;

    @ApiModelProperty(value = "最终决策人工号/姓名")
    @Column(name = "final_judger")
    private String finalJudger;

    @ApiModelProperty(value = "新员工考试成绩")
    @Column(name = "new_exam_score")
    private BigDecimal newExamScore;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "员工状态：1 待启动考核；2 考核进行中；3 已转正；4 已淘汰；5、已终止")
    @Column(name = "worker_status")
    private Integer workerStatus;

    @ApiModelProperty(value = "流程阶段：11 已创建第一个月承诺流程；12 已创建第一个月考核流程；21 已创建第二个月承诺流程；依此类推；")
    @Column(name = "flow_stage")
    private Integer flowStage;

    @Column(name = "job_type")
    private String jobType;

    @Column(name = "job_level")
    private String jobLevel;

    private Double yanScore;

    private Byte changeDeptManageFlag;
    private Byte changeSecManageFlag;

    public enum changeFlag{
        YES((byte)1),
        NO((byte)0);

        private Byte code;

        public Byte getCode() {
            return code;
        }

        changeFlag(Byte code) {
            this.code = code;
        }
    }
}
